package com.lagou.repository;

import com.lagou.bean.Person;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PersonRepository extends Neo4jRepository<Person,Long> {

     @Query("match p=((person:Person{name:{startName}})-[*]-(person2:Person {name:{endName}})) return p")
     List<Person>   pathAll(@Param("startName") String startName,@Param("endName") String endName);





}
